﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SanPham.ascx.cs" Inherits="usercontrol_SanPham" %>
<%@ Register assembly="CollectionPager" namespace="SiteUtils" tagprefix="cc1" %>
<style type="text/css">
    .style1
    {
        text-align: left;
    }
    .style3
    {
        text-align: center;
    }
    .style4
    {
        width: 32px;
        height: 32px;
    }
    .style5
    {
        width: 600px;
    }
</style>
<table style="width: 100%;">
    <tr>
        <td bgcolor="Red" style="color: #FFFFFF; font-weight: 700; text-align: center;" 
            class="style5">
            Sản Phẩm</td>
    </tr>
    <tr>
        <td class="style5">
            <%--<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:COMPUTERConnectionString %>" 
                
                SelectCommand="select top 10 MaSP,TenSP,Hinh,Gia from SanPham order by Gia desc">
            </asp:SqlDataSource>--%>
            <asp:DataList ID="dtlSP" runat="server" DataKeyField="MaSP"  RepeatColumns="2" 
                RepeatDirection="Horizontal" BackColor="#CCCCCC" BorderColor="#999999" 
                BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" 
                ForeColor="Black" GridLines="Both" Width="100%">
                <FooterStyle BackColor="#CCCCCC" />
                <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                <ItemStyle BackColor="White" />
                <ItemTemplate>
                    <table border="1px" style="width:100%;" width="199px;">
                        <tr>
                            <td class="style3">
                                <asp:Label ID="TenSPLabel" runat="server" Text='<%# Eval("TenSP") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td class="style3">

                                <asp:Image ID="Image1" runat="server" Height="100px" 
                                    ImageUrl='<%# "~/Upload/" + Eval("Hinh") %>' Width="100px" 
                                    style="text-align: center" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style3">
                                Giá:
                                <asp:Label ID="GiaLabel" runat="server" Text='<%# Eval("Gia") %>' 
                                    style="color: #FF0000" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                &nbsp;<img alt="" class="style4" src="./Images/Giohang.gif" /><asp:HyperLink 
                                    ID="HyperLink1" runat="server" 
                                    NavigateUrl='<%# "~/GioHang.aspx?MaSP="+Eval("MaSP") %>'>Mua Hàng</asp:HyperLink>
                            </td>
                        </tr>
                    </table>
<br />
                </ItemTemplate>
                <SelectedItemStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
            </asp:DataList>
             <center> <cc1:CollectionPager ID="CollectionPager2" runat="server" BackText="« Trước" 
                    FirstText="Đầu" LabelText="Trang:" LastText="Cuối" NextText="Sau »" 
                    ResultsFormat="Kết quả từ {0}-{1} (của {2}) bài viết" ShowFirstLast="True" 
                    SliderSize="10" PagingMode="PostBack" BackNextDisplay="Buttons" 
                    BackNextLinkSeparator="·" HideOnSinglePage="True" IgnoreQueryString="False" 
                    PageNumbersDisplay="Numbers" PageSize="10" ResultsLocation="Top" 
                    SectionPadding="10" ShowLabel="True" ShowPageNumbers="True" UseSlider="True" 
                        BackNextLocation="Split" LabelStyle="" ControlStyle="color:white" 
                        PageNumbersStyle="color:orange" PageNumberStyle=""></cc1:CollectionPager></center> 
        </td>
    </tr>
</table>

